<script setup lang="ts">
import { ArrowLeftBold, ArrowRight, Search } from '@element-plus/icons-vue'
import { onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
import { useSearchStore } from '@/stores/search'
import { storeToRefs } from 'pinia'
const { content } = storeToRefs(useSearchStore())
let action = useSearchStore()
const router = useRouter()
let tui = (value:string)=>{
    action.changerefund2(value)
    router.push('/shop')
}
</script>
<template>
    <div id="refund">
        <div class="top">
            <el-icon @click="router.back()">
                <ArrowLeftBold />
            </el-icon>
            <h3 style="margin: 0 auto">申请退款</h3>
        </div>
        <div class="content">
            <span>退款后订单无法恢复，优惠券，红包不可返还。</span>
        </div>
        <div class="main">
            <ul>
                <li class="list">
                    <p>订单编号</p>
                    <p style="color: red;">{{ content.order}}</p>
                </li>
                <li class="list">
                    <p>退款金额</p>
                    <p style="color: red;">{{ content.price }}</p>
                </li>
                <li class="list">
                    <p>退款方式</p>
                    <p>微信支付</p>
                </li>
            </ul>
        </div>
        <div class="aaa">
            <p style="font-size: 14px;background-color: #EFF0F2;">请选择退款原因</p>
            <div class="main">
                <ul>
                    <li class="list">
                        <p>商品错选/多选</p>
                        <div><input type="radio" name="a" id=""></div>
                    </li>
                    <li class="list">
                        <p>计划有变，不想要了</p>
                        <div><input type="radio" name="a" id=""></div>
                    </li>
                    <li class="list">
                        <p>价格太贵了</p>
                        <div><input type="radio" name="a" id=""></div>
                    </li>
                    <li class="list">
                        <p>收货人信息填写错误</p>
                        <div><input type="radio" name="a" id=""></div>
                    </li>
                    <li class="list">
                        <p>物流速度太慢了</p>
                        <div><input type="radio" name="a" id=""></div>
                    </li>
                    <li class="list">
                        <p>其他</p>
                        <div><input type="radio" name="a" id=""></div>
                    </li>
                </ul>
            </div>
            <div class="footer" style="margin-top: 10px;">
                <p style="font-size: 14px;">补充说明</p>
                <div>
                    <textarea style="background-color:#EFF0F2 ;border: none;padding: 10px;" placeholder="请输入补充说明(选填)" cols="50" rows="6"></textarea>
                </div>
            </div>
            <div style="width: 100%;margin-top: 70px;text-align: center;">
                <button style="width: 90%; height: 40px;background-color: red; color: #fff;border: none;border-radius: 20px;" @click="tui(content._id)">申请退款</button>
            </div>
        </div>
    </div>
</template>



<style scoped lang="scss">
#refund {
    width: 100%;
    height: 100%;

    .top {
        width: 100%;
        height: 30px;
        background-color: #fff;
        display: flex;
        align-items: center;
    }

    .content {
        width: 100%;
        height: 30px;
        line-height: 30px;
    }

    .main {
        width: 100%;
        height: 150px;

        .list {
            width: 100%;
            height: 50px;
            background-color: #fff;
            display: flex;
            justify-content: space-between;
            align-items: center;

        }
    }

    .aaa {
        width: 100%;
        height: 630px;
        background-color: #fff;

        .main {
            width: 100%;
            height: 300px;
            background-color: #fff;

            .list {
                width: 100%;
                height: 50px;
                background-color: #fff;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
        }
    }

}
</style>